package com.yt.app.h5.exception;

/**
 * Created by dashan on 2017/11/21.
 */
public class AppException extends  RuntimeException{
    private String errno;
    private String errdesc;
    public AppException(String errno){
        this.errno = errno;
    }
    public AppException(String errno, String errdesc){
        this.errno = errno;
        this.errdesc =errdesc;
    }

    public String getErrno() {
        return errno;
    }

    public void setErrno(String errno) {
        this.errno = errno;
    }

    public String getErrdesc() {
        return errdesc;
    }

    public void setErrdesc(String errdesc) {
        this.errdesc = errdesc;
    }

    /**
     * 创建提示异常
     *
     * @param errMsg 错误提示信息
     * @return
     */
    public static AppException newInstance(String errMsg) {
        AppException exception = new AppException("1", errMsg);
        return exception;
    }
}
